package org.conducta.ui.swing.fixture;

import java.util.ArrayList;
import java.util.List;
import org.fest.swing.fixture.JRadioButtonFixture;

/**
 *
 * @author Stoyan Vassilev
 */
public class JRadioButtonGroupFixture {
 private final List<JRadioButtonFixture> m_radioFixtures;
 public JRadioButtonGroupFixture(JRadioButtonFixture... radioFixtures) {
    m_radioFixtures = new ArrayList<JRadioButtonFixture>();
    for (JRadioButtonFixture radioFixture: radioFixtures)
    {
        m_radioFixtures.add(radioFixture);
    }
 }
 
 public JRadioButtonFixture findByText(String text) {
    for (JRadioButtonFixture radioFixture: m_radioFixtures)
    {
        if (text.equals(radioFixture.text()))
        {
            return radioFixture;
        }
    }
    return null;
 }
}
